#version 330 core

layout(location = 1) in vec3 a_Position1;
layout(location = 3) in vec2 a_TexCoord;
layout(location = 6) in vec3 a_Position2;

uniform mat4 u_ProjectionMat;
uniform mat4 u_ModelViewMat;

out vData
{
	vec4 position1;
	vec4 position2;
	vec2 texCoord;
} vertex;

void main(void)
{
	mat4 MWP = u_ProjectionMat * u_ModelViewMat;
	vertex.position1 = MWP * vec4(a_Position1, 1.0);
	vertex.position2 = MWP * vec4(a_Position2, 1.0);
	vertex.texCoord = a_TexCoord;

	gl_Position  = MWP * vec4(a_Position1, 1.0);
}